package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.ClasseWork;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClasseWorkMapper {

    int insertSelective(ClasseWork record);

    ClasseWork selectByPrimaryKey(Integer classeWorkId);

    int updateByPrimaryKeySelective(ClasseWork record);
    // 查询
    List<ClasseWork> selectAll(ClasseWork classeWork);
    // 计数
    int countClasseWork(ClasseWork classeWork);
    // 启用/停用/删除
    int definedClasseWork(@Param("classeWorkIds") Long[] classeWorkIds,@Param("dataState") Integer dataState);
    // 判断是否开工
    Integer queryClasseWork(ClasseWork classeWork);
    // 批量登出
    int logoutClasseWork(@Param("classeWorkIds")Long[] classeWorkIds,@Param("logoutUserId") Integer logoutUserId);
    // 查询班次时间
    String queryClasseHour(@Param("classeId")Integer classeId);

    /**
     * 查询班次开工数
     * @param classeIds
     * @return
     */
    int queryUseClasse(@Param("classeIds") Integer[] classeIds);
}